home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 72 / IOPROG_72.ISO / soft / c++ / NCTDiscWriter2.exe / {app} / MS C# 7.0 Samples / TestCSAudioCDRipper / Form2.cs < prev    next >
Encoding:
Text File  |  2003-03-04  |  3.4 KB  |  133 lines

  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6.  
  7. namespace TestCSharpAudioCDRipper
  8. {
  9.     /// <summary>
  10.     /// Summary description for Form2.
  11.     /// </summary>
  12.     public class Form2 : System.Windows.Forms.Form
  13.     {
  14.         internal System.Windows.Forms.Label Label1;
  15.         internal System.Windows.Forms.ProgressBar pb2;
  16.         internal System.Windows.Forms.ProgressBar pb1;
  17.         internal System.Windows.Forms.Button Button1;
  18.         /// <summary>
  19.         /// Required designer variable.
  20.         /// </summary>
  21.         private System.ComponentModel.Container components = null;
  22.  
  23.         public Form2()
  24.         {
  25.             //
  26.             // Required for Windows Form Designer support
  27.             //
  28.             InitializeComponent();
  29.  
  30.             //
  31.             // TODO: Add any constructor code after InitializeComponent call
  32.             //
  33.         }
  34.  
  35.         /// <summary>
  36.         /// Clean up any resources being used.
  37.         /// </summary>
  38.         protected override void Dispose( bool disposing )
  39.         {
  40.             if( disposing )
  41.             {
  42.                 if(components != null)
  43.                 {
  44.                     components.Dispose();
  45.                 }
  46.             }
  47.             base.Dispose( disposing );
  48.         }
  49.         public string FileName;
  50.         public Form1 form;
  51.         #region Windows Form Designer generated code
  52.         /// <summary>
  53.         /// Required method for Designer support - do not modify
  54.         /// the contents of this method with the code editor.
  55.         /// </summary>
  56.         private void InitializeComponent()
  57.         {
  58.             this.Label1 = new System.Windows.Forms.Label();
  59.             this.pb2 = new System.Windows.Forms.ProgressBar();
  60.             this.pb1 = new System.Windows.Forms.ProgressBar();
  61.             this.Button1 = new System.Windows.Forms.Button();
  62.             this.SuspendLayout();
  63.             // 
  64.             // Label1
  65.             // 
  66.             this.Label1.Location = new System.Drawing.Point(9, 14);
  67.             this.Label1.Name = "Label1";
  68.             this.Label1.Size = new System.Drawing.Size(366, 16);
  69.             this.Label1.TabIndex = 11;
  70.             // 
  71.             // pb2
  72.             // 
  73.             this.pb2.Location = new System.Drawing.Point(10, 53);
  74.             this.pb2.Name = "pb2";
  75.             this.pb2.Size = new System.Drawing.Size(366, 8);
  76.             this.pb2.Step = 1;
  77.             this.pb2.TabIndex = 9;
  78.             // 
  79.             // pb1
  80.             // 
  81.             this.pb1.Location = new System.Drawing.Point(9, 38);
  82.             this.pb1.Name = "pb1";
  83.             this.pb1.Size = new System.Drawing.Size(366, 8);
  84.             this.pb1.Step = 1;
  85.             this.pb1.TabIndex = 8;
  86.             // 
  87.             // Button1
  88.             // 
  89.             this.Button1.Location = new System.Drawing.Point(286, 75);
  90.             this.Button1.Name = "Button1";
  91.             this.Button1.Size = new System.Drawing.Size(88, 24);
  92.             this.Button1.TabIndex = 12;
  93.             this.Button1.Text = "Cancel";
  94.             // 
  95.             // Form2
  96.             // 
  97.             this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  98.             this.ClientSize = new System.Drawing.Size(382, 106);
  99.             this.Controls.AddRange(new System.Windows.Forms.Control[] {
  100.                                                                           this.Button1,
  101.                                                                           this.Label1,
  102.                                                                           this.pb2,
  103.                                                                           this.pb1});
  104.             this.Name = "Form2";
  105.             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
  106.             this.Text = "Rip Progress";
  107.             this.Load += new System.EventHandler(this.Form2_Load);
  108.             this.ResumeLayout(false);
  109.  
  110.         }
  111.         #endregion
  112.  
  113.         private void Button1_Click(object sender, System.EventArgs e)
  114.         {
  115.             form.CancelRip = true;
  116.         }
  117.  
  118.         public void DrawTextMy(string text)
  119.         {
  120.             if (text.Length < 1) text = FileName;
  121.             //text = MinimizeName(text,Canvas,pb1->Width)
  122.             Label1.Text = text;
  123.             Label1.Refresh();
  124.         }
  125.  
  126.         private void Form2_Load(object sender, System.EventArgs e)
  127.         {
  128.         
  129.         }
  130.  
  131.     }
  132. }
  133.